Nowadays, digital cameras with CCD or CMOS sensors to take pictures have overtopped traditional cameras that use films to retain images and become commercial mainstream. As the CCD or CMOS sensors can only distinguish light intensities other than color differences, a color filter, also referred to as CF, is generally required in front of the CCD or CMOS sensors for color correction.
The color filter filters colors according to three primary colors, including R (red), G (green) and B (blue). Therefore, three CCD elements are required for the same position for capturing RGB data. The color data obtained by the three CCD elements are then mixed to realize a full-color pixel. Due to cost and size considerations, however, the RGB data are not simultaneously picked up for most digital cameras, and instead, only one of the RGB data is sensed at the same position while giving up the other two color data.
Despite some color components are given up for reducing cost and device size, it is preferred to reconstruct the color data to some extent so as to improve image quality. Please refer to FIG. 1, which illustrates a color filter array (CIA) commonly used in a digital camera. Each block in the diagram represents a pixel of a CCD. As shown, the G, B and R pixel numbers are in a ratio of 2:1:1. Such distribution is so-called as a Bayer pattern. The details of a Bayer pattern, for example, can be realized from U.S. Pat. No. 3,971,065, which is incorporated herein for reference. By interpolating the color data obtained by the combination of CFA and CCD, the color data of lost components can be mathematically reconstructed.
A variety of interpolation algorithms can be applied to this field to reconstruct color data. One of the algorithms is constant interpolation such as “nearest interpolation”, “bilinear interpolation”, “smooth hue transition”, etc. According to the constant interpolation algorithm, the pixels selected for calculating color data of a specified pixel are located at fixed positions relative to the specified pixel. If the specified pixel is an edge point, pixel(s) beyond the edge will be incorporated for determining the color data of the specified pixel, which might result in a blurred edge.
A non-constant interpolation algorithm instead of constant interpolation algorithm is also developed. As the term “non-constant” means, distances from the pixels selected for determining the color data to a specified pixel in such an interpolation algorithm are not constant. The non-constant interpolation algorithm takes edges into consideration to lower an effect of blurred edges, as described in U.S. Pat. No. 5,629,734, which is incorporated herein for reference. However, in the prior art, the selected pixels are always in the same row and the same column (see arrows) as the specified pixel 1, as shown in FIG. 1. Therefore, the blurred edge problem can only be ameliorated in limited cases, and the reconstructed image quality is still far from satisfaction.